<?php
include("../include/config.inc.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>演出排期 - 订戏会</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=9,Chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" type="text/css" href="../css/public.css">
<link rel="stylesheet" type="text/css" href="../css/index.css">
<link href="css/src/ui-choose.css" rel="stylesheet" />
</head>

<body>
<div class="head-nav">
	<div class="head-left"><a href="#1"><div class="back">返回</div></a></div>
	<div class="head-center">演出排期</div>
	<div class="head-right"><a href="#"><div class="shuoming"></div></a></div>
</div>
<div class="mod-form">	
	<div class="order-box">
		<div class="form-date" style="background:#FFFFFF;">
			<h1>演出日期</h1>
			<ul>
				<li>日</li>
				<li>一</li>
				<li>二</li>
				<li>三</li>
				<li>四</li>
				<li>五</li>
				<li>六</li>
			</ul>
			<span>2017年9月</span>
			<select class="ui-choose" multiple="multiple" id="uc_04" name="posTypeSelect[]">
				<option></option>
				<option></option>
				<option></option>
				<option></option>
			<?php for($d=1;$d<=30;$d++){
			if($d<=9){
			$dd="0".$d;
			}else{
			$dd=$d;
			}
			?>
			<?php
			$selectdate="2017-09-".$dd;
			$sql = "select count(*) as count from ".tableprefix."datetime where date='$selectdate' and flag='T'";
			$row=$db->fetch_array($db->query($sql));
			$count=$row["count"];
			?>
			<?php if($count==0){?>
			<option value="2017-09-<?php echo $dd;?>" disabled="disabled"><?php echo $d;?></option>
			<?php }else{?>
			<option value="2017-09-<?php echo $dd;?>"><?php echo $d;?></option>		
			<?php }?>
			<?php }?>
			</select>
			<span>2017年10月</span>
			<select class="ui-choose" multiple="multiple" id="uc_04" name="posTypeSelect[]">
				<option></option>
				<option></option>
				<option></option>
				<option></option>
				<option></option>
				<option></option>
			<?php for($d=1;$d<=31;$d++){
			if($d<=9){
			$dd="0".$d;
			}else{
			$dd=$d;
			}
			?>
			<?php
			$selectdate="2017-10-".$dd;
			$sql = "select count(*) as count from ".tableprefix."datetime where date='$selectdate' and flag='T'";
			$row=$db->fetch_array($db->query($sql));
			$count=$row["count"];
			?>
			<?php if($count==0){?>
			<option value="2017-10-<?php echo $dd;?>" disabled="disabled"><?php echo $d;?></option>
			<?php }else{?>
			<option value="2017-10-<?php echo $dd;?>"><?php echo $d;?></option>		
			<?php }?>
			<?php }?>
			</select>
			<span>2017年11月</span>
			<select class="ui-choose" multiple="multiple" id="uc_04" name="posTypeSelect[]">
				<option></option>
				<option></option>
			<?php for($d=1;$d<=30;$d++){
			if($d<=9){
			$dd="0".$d;
			}else{
			$dd=$d;
			}
			?>
			<?php
			$selectdate="2017-11-".$dd;
			$sql = "select count(*) as count from ".tableprefix."datetime where date='$selectdate' and flag='T'";
			$row=$db->fetch_array($db->query($sql));
			$count=$row["count"];
			?>
			<?php if($count==0){?>
			<option value="2017-11-<?php echo $dd;?>" disabled="disabled"><?php echo $d;?></option>
			<?php }else{?>
			<option value="2017-11-<?php echo $dd;?>"><?php echo $d;?></option>		
			<?php }?>
			<?php }?>
			</select>
			<span>2017年12月</span>
			<select class="ui-choose" multiple="multiple" id="uc_04" name="posTypeSelect[]">
				<option></option>
				<option></option>
			<?php for($d=1;$d<=31;$d++){
			if($d<=9){
			$dd="0".$d;
			}else{
			$dd=$d;
			}
			?>
			<?php
			$selectdate="2017-12-".$dd;
			$sql = "select count(*) as count from ".tableprefix."datetime where date='$selectdate' and flag='T'";
			$row=$db->fetch_array($db->query($sql));
			$count=$row["count"];
			?>
			<?php if($count==0){?>
			<option value="2017-12-<?php echo $dd;?>" disabled="disabled"><?php echo $d;?></option>
			<?php }else{?>
			<option value="2017-12-<?php echo $dd;?>"><?php echo $d;?></option>		
			<?php }?>
			<?php }?>
			</select>
			<span style="margin:0px auto;height:60px;width:100%;overflow:hidden;"></span>
		</div>
	</div>	
</div>

<footer id="bar-fixed">
	<a href="../index.php" class="tab-item active"><i class="icon-tabbar bar-home2"></i>首页</a>
	<a href="../category.php" class="tab-item"><i class="icon-tabbar bar-message"></i>分类</a>
	<a href="../publish" class="tab-item"><i class="icon-tabbar bar-publish"></i>发布</a>	
	<a href="../user" class="tab-item"><i class="icon-tabbar bar-user"></i>我</a>
</footer>
<script src="../js/src/jquery-1.11.0.min.js"></script>
<script src="../js/src/ui-choose.js"></script>
<script>
	// 将所有.ui-choose实例化
	$('.ui-choose').ui_choose();
	// uc_04 select 多选
	var uc_04 = $('#uc_04').ui_choose();
	uc_04.click = function(value, item) {
	    console.log('click', value);
	};
	uc_04.change = function(value, item) {
	    console.log('change', value);
	};
</script>
</body>
</html>
<?php
$db->close();
exit;
?>